/* 筛选按钮样式 */
.filter-btn {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    /* background: #f5f5f5; */
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover {
    background: #e6e6e6;
}

.filter-btn.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}



/* 难度标签样式 */
.difficulty-tag {
    position: absolute;
    /* bottom: 195px; */
    right: 10px;
    /* padding: 3px 8px;
    /* border-radius: 4px; */
    font-size: 12px;
    font-weight: bold;
    color: white;
    background-color: green;
}


/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #1890ff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示 - 居中显示 */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 20px;
    background: #ff4d4f;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    text-align: center;
    min-width: 200px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in-out;
}

/* 淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 关闭按钮 */
.error-message .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 16px;
}

/* 无结果提示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}


/* 用户控制样式 */
.user-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-controls span {
    color: #333;
    font-size: 14px;
}

.login-btn {
    padding: 5px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.login-btn:hover {
    background-color: #45a049;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-indent: 30px;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.submit-btn:hover {
    background-color: #45a049;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
}


/* 用户控制区域 */
.user-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 100;
}

/* 用户资料区域 */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.user-profile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-profile svg {
    color: var(--primary-color);
}

.username {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 退出按钮 */
.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: rgba(239, 35, 60, 0.1);
    color: var(--error-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: rgba(239, 35, 60, 0.2);
}

.logout-btn svg {
    width: 16px;
    height: 16px;
}

/* 登录按钮
.auth-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #fff;
    color: #4caf50;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.2);
}

.auth-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}
 */

.auth-btn svg {
    width: 16px;
    height: 16px;
}



/* 响应式调整 */
@media (max-width: 768px) {
    .user-controls {
        top: 15px;
        right: 15px;
    }

    .username {
        display: none;
    }

    .user-profile {
        padding: 8px;
    }

    .logout-btn span {
        display: none;
    }

    .auth-btn span {
        display: none;
    }

    .auth-btn {
        padding: 8px;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}



/* ========== 徒步卡片网格 ========== */
.hike-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xxl);
}

.hike-card {
  background: var(--dark-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-md);
  position: relative;
}
.hike-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #000;
  transform-style: preserve-3d;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
  opacity: 1 !important;
}
.hike-card:hover .card-image img {
  transform: scale(1.05);
  opacity: 1;
  filter: brightness(1);
}
.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.2) 0%, transparent 60%);
}

.difficulty-tag {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-round);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  z-index: 2;
}
.difficulty-tag.简单 {
  background: var(--primary);
}
.difficulty-tag.中等 {
  background: var(--secondary);
}
.difficulty-tag.困难 {
  background: var(--danger);
}

.save-btn {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 2;
}
.save-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}
.save-btn svg {
  width: 16px;
  height: 16px;
  color: white;
  margin-right: 1px;
}

.card-content {
  padding: var(--space-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}
.card-header h3 {
  font-size: 1.25rem;
  margin-right: var(--space-sm);
  flex: 1;
}

.rating {
  display: flex;
  align-items: center;
}
.star {
  width: 16px;
  height: 16px;
  color: #555;
  margin-right: 2px;
}
.star.filled {
  color: #FFC107;
  fill: #FFC107;
}
.rating span {
  margin-left: var(--space-xs);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.location {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}
.location svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.stat {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.stat svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.explore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-sm);
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-normal);
  gap: var(--space-sm);
}
.explore-btn:hover {
  background: var(--primary-dark);
  transform: translateX(4px);
  text-decoration: none;
}
.explore-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}
.explore-btn:hover svg {
  transform: translateX(4px);
}

/* 卡片名称限制 */
.hike-name {
  display: inline-block;
  max-width: 190px;         /* 根据你的字体大小调整 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 卡片长度限制 */
.hike-length {
    display: inline-block; /* 或 block，取决于布局 */
    max-width: 10ch;       /* 限制宽度为 9 个字符 */
    white-space: nowrap;   /* 禁止换行 */
    overflow: hidden;      /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
}

/* 最佳时间限制 */
.hike-best_time {
    display: inline-block; /* 或 block，取决于布局 */
    max-width: 6ch;       /* 限制宽度为 9 个字符 */
    white-space: nowrap;   /* 禁止换行 */
    overflow: hidden;      /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
}


.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

.filter-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* 搜索框样式 */
.search-box {
    margin-left: 0; /* 或者直接移除这一行 */
    display: flex;
    align-items: center;
    gap: 8px;
}


.search-input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* 加载指示器样式 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #4CAF50;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误消息样式 */
.error-message {
    padding: 15px;
    background: #ffebee;
    color: #c62828;
    border-radius: 4px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
}

/* 头部统计信息样式 */
.header-stats {
    display: flex;
    gap: 15px;
    margin-left: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    min-width: 45%;
    margin-bottom: var(--space-sm);
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
    .header-stats {
        flex-wrap: wrap;
        justify-content: center;
        margin-left: 0;
    }

    .header-stats {
        order: 3;
        width: 100%;
        justify-content: center;
        margin: 10px 0 0 0;
        gap: 10px;
    }

    .stat-item {
        flex: 1;
        max-width: 120px;
        padding: 8px 5px;
    }

    .nav-links {
        order: 2;
        margin-top: 10px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .stat-item {
        min-width: auto;
    }

    .stat-value {
        font-size: 13px;
    }

    .stat-label {
        font-size: 11px;
    }
}



  /* 基础样式 */
  .province-form {
    font-family: 'Segoe UI', system-ui, sans-serif;
  }

  .form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    padding-left: 5px;
  }

  .form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 1.5rem;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
  }

  /* 交互状态 */
  .form-select:hover {
    border-color: #86b7fe;
  }

  .form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  }

  .form-select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
  }

  /* 暗黑模式支持 */
  @media (prefers-color-scheme: dark) {
    .form-label {
      color: #e9ecef;
    }

    .form-select {
      color: #f8f9fa;
      background-color: #343a40;
      border-color: #495057;
      background-image: url('data:image/svg+xml;utf8,<svg fill="%23f8f9fa" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    }
  }


/* 搜索框容器 */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: var(--space-sm);
}

/* 输入框样式 */
.search-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 300px;
}

/* 按钮容器 */
.button-group {
    display: flex;
    gap: 8px;
}

/* 按钮样式 */
.filter-btn {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #fff;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}



#messageDisplay {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 5px;
    display: none;
    transition: all 0.3s ease;
    max-width: 300px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

#messageDisplay.error {
    color: #dc3545;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

#messageDisplay.success {
    color: #28a745;
    background-color: #d4edda;
    border-color: #c3e6cb;
}



/* 管理员面板样式 */
.comment-review-section {
    background-color: #f8f9fa;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-panel  {
    background-color: #f8f9fa;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pending-hikes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pending-hike-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-approve, .btn-reject, .btn-preview {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-approve {
    background-color: #28a745;
    color: white;
}

.btn-reject {
    background-color: #dc3545;
    color: white;
}

.btn-preview {
    background-color: #17a2b8;
    color: white;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: normal;
}

.admin-panel h3 {
    color: #444;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-panel h3:before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #4e73df;
    border-radius: 2px;
}

.pending-hikes-list {
    margin-bottom: 25px;
}

.pending-hike-card {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.pending-hike-card h4 {
    color: #333;
    margin-bottom: 5px;
}

.pending-hike-card p {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-review-comments {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background-color: #4e73df;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s;
}

.btn-review-comments:hover {
    background-color: #3a5bc7;
    color: white;
    transform: translateY(-1px);
}

.btn-review-comments:active {
    transform: translateY(0);
}

/* 按钮图标 */
.btn-review-comments:before {
    content: "✏️";
}



/* 待审核留言-按钮图标 */
.btn-review-messages:before {
    content: "✏️";
}

.btn-review-messages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    margin-left: 20px;
    background-color: #4e73df;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s;
}

.btn-review-messages:hover {
    background-color: #3a5bc7;
    color: white;
    transform: translateY(-1px);
}

.btn-review-messages:active {
    transform: translateY(0);
}

/* 按钮图标 */
.btn-review-comments:before {
    content: "✏️";
}



/* 广播公告样式 */
.announcement-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.announcement-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.announcement-header svg {
    margin-right: 10px;
    color: #3498db;
}

.announcement-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #343a40;
    flex-grow: 1;
}

.announcement-controls {
    display: flex;
    gap: 5px;
}

.announcement-controls button {
    background: #e9ecef;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.announcement-controls button:hover {
    background: #dee2e6;
}

.announcement-content {
    position: relative;
    min-height: 100px;
}

.announcement-item {
    display: none;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.announcement-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.announcement-item h4 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.announcement-item p {
    margin: 10px 0;
    color: #495057;
    line-height: 1.5;
}

.announcement-date {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    text-align: right;
}

.announcement-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    float: right;
    margin-top: 5px;
}

.announcement-form {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #dee2e6;
}

.announcement-form input,
.announcement-form textarea {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
}

.announcement-form textarea {
    min-height: 80px;
    resize: vertical;
}

.announcement-form button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.announcement-form button:hover {
    background: #2980b9;
}